import request from '@/utils/request'
//老师领取任务
export function teacherFetchTask(query) {
  return request({
    url: '/teacher/task/fetchTask',
    method: 'post',
    data: query
  })
}


// 查询领取任务列表
export function listTask(query) {
  return request({
    url: '/teacher/task/list',
    method: 'get',
    params: query
  })
}

// 查询领取任务详细
export function getTask(id) {
  return request({
    url: '/teacher/task/' + id,
    method: 'get'
  })
}

// 新增领取任务
export function addTask(data) {
  return request({
    url: '/teacher/task',
    method: 'post',
    data: data
  })
}

// 修改领取任务
export function updateTask(data) {
  return request({
    url: '/teacher/task',
    method: 'put',
    data: data
  })
}

// 删除领取任务
export function delTask(id) {
  return request({
    url: '/teacher/task/' + id,
    method: 'delete'
  })
}
